package com.nlx.notes.module.service.category.impl;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.nlx.notes.module.bean.vo.category.ThreadCategoryRelVO;
import com.nlx.notes.module.entity.ThirdPartyCategorys;
import com.nlx.notes.module.mapper.ThirdPartyCategorysMapper;
import com.nlx.notes.module.service.category.IThirdPartyCategorysService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author nlx
 * @since 2025-09-06
 */
@Service
public class ThirdPartyCategorysServiceImpl extends ServiceImpl<ThirdPartyCategorysMapper, ThirdPartyCategorys> implements IThirdPartyCategorysService {

    @Override
    public List<ThreadCategoryRelVO> findCateGoryByThirdNames(String ThirdCategoryType,Long userId) {
        if(StrUtil.isEmpty(ThirdCategoryType)){
            return CollUtil.newArrayList();
        }
        return this.getBaseMapper().findCateGoryByThirdNames(ThirdCategoryType,userId);
    }
}
